package com.cz.video.common.exception;


import com.cz.video.common.core.domain.R;

/**
 * @ClassName : VodException
 * @Description : vod异常
 * @Author : 陈智
 * @Date: 2023/7/8  17:13
 */
public class VodException extends RuntimeException{
    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误提示
     */
    private String message;

    /**
     * 错误明细，内部调试错误
     * <p>
     * 和 {@link R#getMsg()} 一致的设计
     */
    private String detailMessage;

    public VodException(String message) {
        this.message = message;
    }

    public VodException(String message, Integer code) {
        this.message = message;
        this.code = code;
    }
    public VodException(String message, String detailMessage) {
        this.message = message;
        this.detailMessage = detailMessage;
    }

    public String getDetailMessage() {
        return detailMessage;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public Integer getCode() {
        return code;
    }

    public VodException setMessage(String message) {
        this.message = message;
        return this;
    }

}
